-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DXCDT-255: Add new email provider manager and deprecate old one #129
Conversation
Codecov ReportBase: 95.39% // Head: 95.24% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
- Coverage 95.39% 95.24% -0.16%
==========================================
Files 37 38 +1
Lines 6085 6310 +225
==========================================
+ Hits 5805 6010 +205
- Misses 226 241 +15
- Partials 54 59 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -19,6 +20,7 @@ type Email struct { | |||
} | |||
|
|||
// EmailCredentials are used for authenticating Email Providers. | |||
// Deprecated: Use EmailProvider instead. | |||
type EmailCredentials struct { | |||
// API User | |||
APIUser *string `json:"api_user,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To note that we're not adding the APIUser field to any of the credentials type within the new EmailProvider
struct. This is because this field is no longer supported and trying to include it in the payload will result in a 400:
{
"statusCode": 400,
"error": "Bad Request",
"message": "Payload validation error: 'None of the valid schemas were met' on property credentials (Credentials required to use the provider). Inner errors: [ Payload validation error: 'Additional properties not allowed: api_user' on property credentials ({description}). ].",
"errorCode": "invalid_body"
}
🔧 Changes
Support for email provider settings has been requested through auth0/terraform-provider-auth0#384.
As we started adding this setting to the old
Email
struct, it was noted that the DX wasn't good enough to be able to distinguish between what settings and even what credentials are specific to each email provider.To solve that we're introducing a brand new
EmailProvider
struct with specific credentials and settings for each email provider type.Also to avoid doing breaking changes we're just marking the old
Email
as deprecated and it will be removed in a future version.📚 References
auth0_email
to use the new go-auth0EmailProvider
terraform-provider-auth0#393🔬 Testing
📝 Checklist